package com.lianxi

/**
  * Created by adengdeng on 2017/8/8 
  */
object Lx7 {

  def main(args: Array[String]): Unit = {
    import scala.collection.JavaConverters._

    val map: scala.collection.Map[String, String] = System.getProperties.asScala

    val maxLength = (for ((k, v) <- map) yield k.length).max

    for ((k, v) <- map) {
      print(k)
      print(" " * (maxLength - k.length))
      print("|" + v)
      println()
    }

  }
}
